/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package cn.apestar.modules.specification.entity;

import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;

import cn.apestar.common.persistence.DataEntity;

/**
 * 规格管理Entity
 * @author yudw
 * @version 2017-04-05
 */
public class ApestarSpecification extends DataEntity<ApestarSpecification> {
	
	private static final long serialVersionUID = 1L;
	private Long version;		// 版本号
	private String orders;		// 排序
	private String name;		// 名称
	private String options;		// 可选项
	private Long productCategory;		// 绑定分类
	private String memo;		// 备注
	private String type;		// 类型
	
	public ApestarSpecification() {
		super();
	}

	public ApestarSpecification(String id){
		super(id);
	}

	@NotNull(message="版本号不能为空")
	public Long getVersion() {
		return version;
	}

	public void setVersion(Long version) {
		this.version = version;
	}
	
	@Length(min=0, max=11, message="排序长度必须介于 0 和 11 之间")
	public String getOrders() {
		return orders;
	}

	public void setOrders(String orders) {
		this.orders = orders;
	}
	
	@Length(min=1, max=255, message="名称长度必须介于 1 和 255 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public String getOptions() {
		return options;
	}

	public void setOptions(String options) {
		this.options = options;
	}
	
	@NotNull(message="绑定分类不能为空")
	public Long getProductCategory() {
		return productCategory;
	}

	public void setProductCategory(Long productCategory) {
		this.productCategory = productCategory;
	}
	
	@Length(min=0, max=255, message="备注长度必须介于 0 和 255 之间")
	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}
	
	@Length(min=1, max=11, message="类型长度必须介于 1 和 11 之间")
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
}